package com.exam.demo.mapper;

import com.exam.demo.domain.Book;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Update;

/**
* @author 46287
* @description 针对表【book】的数据库操作Mapper
* @createDate 2023-11-09 08:54:01
* @Entity com.exam.demo.domain.Book
*/
public interface BookMapper extends BaseMapper<Book> {


    @Update("update book set store = store -1 where id = #{id}")
    public int rentBook( Book book);

    @Update("update book set store = store +1 where id = #{id}")
    public int backBook( Book book);

}




